package com.neutech.variable;

/**
 * Math类的使用
 * @author Neuedu-远哥
 * @version 1.0
 * @date 2021/11/9 9:02
 */
public class Demo05 {
    public static void main(String[] args) {
        System.out.println(Math.sin(Math.PI / 6));
        System.out.println(Math.sqrt(5));
//        int result = Math.round(1.8f);
//        long re2 = Math.round(2.8);
        System.out.println(Math.round(Math.PI * 100.0) / 100.0 );
        // [1,20]
        System.out.println((int)(Math.random() * 20 + 1));
        // [750,5000)
        System.out.println((int)(Math.random() * 4250) + 750);
    }
}
